<h3>规格</h3>
@foreach ($specs as $spec)
<div>
    <label>{{ $spec->name }}</label>
    @if ( $spec->type == Specificant::OPTION_TEXT)
    <input type="text" name="specs[{{ $spec->id }}]" value="{{ $spec->default }}" > 
    @elseif ($spec->type == Specificant::OPTION_SELECT)
    <select name="specs[{{ $spec->id }}]" >
        @foreach ($spec->options as $opt)
        <option value="{{ $opt->value }}">{{ $opt->name }}</option>
        @endforeach
    </select>
    @elseif ($spec->type == Specificant::OPTION_CHECKBOX)						
        @foreach ($spec->options as $opt)
        <input type="checkbox" name="specs[{{ $spec->id }}][]" value="{{ $opt->value }}" >{{ $opt->name }}
        @endforeach
    @elseif ($spec->type == Specificant::OPTION_RADIO)
        @foreach ($spec->options as $opt)
        <input type="radio" name="specs[{{ $spec->id }}]" value="{{ $opt->value }}" > {{ $opt->name }}
        @endforeach					
    @endif
    
</div>
@endforeach